const { execSync } = require('child_process')
/**
 * 1. 基本格式转换 avi mp4 gif 等
 * 2. 提取视频中音频
 * 3. 裁剪视频 -ss 10 -to 20
 * 4. 加水印  -vf drawtext=text="wsws":fontsize=30:x=10:y=10:fontcolor=red 
 * 5. 去水印  -vf delogo=w=120:h=30:x=10:y=10
 */

execSync('ffmpeg -i ./video/mouse_cat2.mp4 ./video/mouse_cat2.gif', { stdio: 'inherit' })
// execSync('ffmpeg -i ../../public/video/mouse_cat.mp4 ./video/mouse_cat.avi', { stdio: 'inherit' })
// execSync('ffmpeg -i ../../public/video/mouse_cat.mp4 ./video/mouse_cat.mp3', { stdio: 'inherit' })
// execSync('ffmpeg -ss 10 -to 20 -i ../../public/video/mouse_cat.mp4 ./video/mouse_cat2.mp4', { stdio: 'inherit' })
// execSync('ffmpeg -i ../../public/video/mouse_cat.mp4 -vf drawtext=text="wsws":fontsize=30:x=10:y=10:fontcolor=red ../../public/video/./video/mouse_cat3.mp4', { stdio: 'inherit' })
// execSync('ffmpeg -i ../../public/video/mouse_cat3.mp4 -vf delogo=w=120:h=30:x=10:y=10 ./video/mouse_cat4.mp4', { stdio: 'inherit' })